Code
from bs4 import BeautifulSoup
import requests
Tony Duan
November 29, 2023
200 means all good!
https://www.youtube.com/watch?v=bargNl2WeN4
---
title: "BeautifulSoup + Requests"
subtitle: "Web Scraping in Python"
author: "Tony Duan"
date: "2023-11-29"
categories: [Python]
execute:
warning: false
error: false
format:
html:
toc: true
toc-location: left
code-fold: show
code-tools: true
number-sections: true
code-block-bg: true
code-block-border-left: "#31BAE9"
---
```{python}
from bs4 import BeautifulSoup
import requests
```
```{python}
url='https://tidystep.netlify.app/'
```
200 means all good!
```{python}
requests.get(url)
```
```{python}
page=requests.get(url)
```
```{python}
soup=BeautifulSoup(page.text,'html')
```
```{python}
#print(soup)
```
```{python}
#print(soup.prettify())
```
# read case
# Reference
https://www.youtube.com/watch?v=bargNl2WeN4